home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume17 / zoo2 / part10 < prev    next >
Encoding:
Internet Message Format  |  1989-02-01  |  47.1 KB

  1. Subject:  v17i073:  Zoo archive program, Part10/10
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4.  
  5. Submitted-by: Rahul Dhesi <bsu-cs!dhesi@iuvax.cs.indiana.edu>
  6. Posting-number: Volume 17, Issue 73
  7. Archive-name: zoo2/part10
  8.  
  9. #! /bin/sh
  10. # This is a shell archive.  Remove anything before this line, then unpack
  11. # it by saving it into a file and typing "sh file".  To overwrite existing
  12. # files, type "sh file -c".  You can also feed this as standard input via
  13. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  14. # will see the following message at the end:
  15. #        "End of archive 10 (of 10)."
  16. # Wrapped by rsalz@papaya.bbn.com on Thu Feb  2 18:04:06 1989
  17. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  18. if test -f 'zoo.1' -a "${1}" != "-c" ; then 
  19.   echo shar: Will not clobber existing file \"'zoo.1'\"
  20. else
  21. echo shar: Extracting \"'zoo.1'\" \(45120 characters\)
  22. sed "s/^X//" >'zoo.1' <<'END_OF_FILE'
  23. X.\"    @(#) zoo.1 2.44 88/08/25 16:05:30 */
  24. X.\"
  25. X.\" For formatting with nroff:
  26. X.\"   tbl zoo.1 | nroff -man | col
  27. X.\" It should be possible to use troff instead of nroff but I haven't
  28. X.\" confirmed this.  R.D.
  29. X.\"
  30. X.TH ZOO 1 "Aug 25, 1988"
  31. X.AT 3
  32. X.de sh
  33. X.br
  34. X.ne 5
  35. X.PP
  36. X\fB\\$1\fR
  37. X.PP
  38. X..
  39. X.SH NAME
  40. Xzoo \- manipulate archives of files in compressed form
  41. X.SH SYNOPSIS
  42. X.B zoo 
  43. X.RB { acfDeghlLPTuUvVx }[ aAcCdEfgImMnNoOpPqSu1:/.@n+\-= ]
  44. Xarchive [file] ...
  45. X.sp 0
  46. X.B zoo \-command 
  47. Xarchive [file] ...
  48. X.sp 0
  49. X.B zoo h
  50. X.SH DESCRIPTION
  51. X.I Zoo
  52. Xis used to create and maintain collections of files in compressed form.
  53. XIt uses a Lempel-Ziv compression algorithm that gives space savings
  54. Xin the range of 20% to 80% depending on the type of file data.
  55. X.I Zoo
  56. Xcan store and selectively extract
  57. Xmultiple generations of the same file.  Data can be recovered
  58. Xfrom damaged archives by skipping the damaged portion
  59. Xand locating undamaged data with the help of
  60. X.I fiz(1).
  61. X.PP
  62. XThis documentation is for version 2.01.  Changes from previous
  63. Xversions are described in the section labelled
  64. X.BR CHANGES .
  65. X.PP
  66. XThe command
  67. X.I zoo 
  68. X.B h
  69. Xgives summary of commands.
  70. X.PP
  71. X.I Zoo 
  72. Xwill not add an archive to itself, nor add the
  73. Xarchive's backup (with 
  74. X.B .bak 
  75. Xextension to the filename) to the archive.
  76. X.PP
  77. X.I Zoo 
  78. Xhas two types of commands:  Expert commands, which consist of one command 
  79. Xletter followed by zero or more modifier characters, and Novice commands, 
  80. Xwhich consist of a hyphen (`\-') followed by a command word that may
  81. Xbe abbreviated.  Expert commands are case-sensitive but Novice commands
  82. Xare not.
  83. X.PP
  84. XWhen 
  85. X.I zoo
  86. Xadds a file to an existing archive, the default action is to maintain 
  87. Xone generation of each file in an archive and 
  88. Xto mark any older generation as deleted.  A limit on the number
  89. Xof generations to save can be specified by the user for
  90. Xan entire archive, or for each file individually, or both.
  91. X.I
  92. XZoo
  93. Xdeletes a stored copy of an added file if necessary to prevent 
  94. Xthe number of stored generations from exceeding the user-specified limit.
  95. X.PP
  96. XDeleted files may be later undeleted.
  97. XArchives may be packed to recover space occupied by deleted files.
  98. X.PP
  99. XAll commands assume that the archive name ends with the characters
  100. X.B .zoo
  101. Xunless a different extension is supplied.  
  102. X.PP
  103. X.B Novice commands
  104. X.PP
  105. XNovice commands may be abbreviated to a hyphen followed by at least
  106. Xone command character.  Each Novice command works in two stages. 
  107. XFirst, the command does its intended work.  Then, if the result was
  108. Xthat one or more files were deleted in the specified archive, the
  109. Xarchive is packed.  If packing occurs, the original unpacked archive
  110. Xis always left behind with an extension of
  111. X.BR .bak .
  112. X.PP
  113. XNo Novice command ever stores the directory prefix of a file.
  114. X.PP
  115. XThe Novice commands are as follows.
  116. X.PP
  117. X.TP 8
  118. X.B \-add
  119. XAdds the specified files to the archive.
  120. X.PP
  121. X.TP
  122. X.B \-freshen
  123. XAdds a specified file to the archive if and only if an older file by
  124. Xthe same name already exists in the archive.
  125. X.PP
  126. X.TP
  127. X.B \-delete
  128. XDeletes the specified files from the archive.
  129. X.PP
  130. X.TP
  131. X.B \-update
  132. XAdds a specified file to the archive either:  if an older file by
  133. Xthe same name already exists in the archive or:  if a file by the
  134. Xsame name does not already exist in the archive.
  135. X.PP
  136. X.TP
  137. X.B \-extract
  138. XExtracts the specified files from the archive.  If no file is specified
  139. Xall files are extracted.
  140. X.PP
  141. X.TP
  142. X.B \-move
  143. XEquivalent to 
  144. X.B \-add
  145. Xexcept that source files are deleted after addition.
  146. X.PP
  147. X.TP
  148. X.B \-print
  149. XEquivalent to 
  150. X.B \-extract
  151. Xexcept that extracted data are sent to standard output.
  152. X.PP
  153. X.TP
  154. X.B \-list
  155. XGives information about the specified archived files including any
  156. Xattached comments.  If no files are
  157. Xspecified all files are listed.  Deleted files are not listed.
  158. X.PP
  159. X.TP
  160. X.B \-test
  161. XEquivalent to
  162. X.B \-extract
  163. Xexcept that the extracted data are not saved but any errors encountered
  164. Xare reported.
  165. X.PP
  166. X.TP
  167. X.B \-comment
  168. XAllows the user to add or update comments attached to archived files.
  169. XWhen prompted, the user may:  type a carriage return to skip the file,
  170. Xleaving any
  171. Xcurrent comment unchanged;  or type a (possibly null) comment of up
  172. Xto 65,535 characters terminated 
  173. Xby
  174. X.B /end
  175. X(case-insensitive) on
  176. Xa separate line;  or type the end-of-file character (normally control D)
  177. Xto skip all remaining files. 
  178. X.PP
  179. X.TP
  180. X.B \-delete
  181. XDeletes the specified files.
  182. X.PP
  183. X.ne 16
  184. X.nf
  185. XThe correspondence between Novice and Expert commands is as follows.
  186. X.PP
  187. X.\" Table formatting for troff thanks to Bill Davidsen <uunet!crdos1!davidsen>
  188. X.sp
  189. X.TS H
  190. Xtab(@);
  191. Xl l l.
  192. XNovice@@Equivalent
  193. XCommand@Description@Expert Command
  194. X_
  195. X\-add@add files to archive@aP:
  196. X\-extract@extract files from archive@x
  197. X\-move@move files to archive@aMP:
  198. X\-test@test archive integrity@xNd
  199. X\-print@extract files to standard output@xp
  200. X\-delete@delete files from archive@DP
  201. X\-list@list archive contents@VC
  202. X\-update@add new or newer files@aunP:
  203. X\-freshen@by add newer files@auP:
  204. X\-comment@add comments to files@c
  205. X.TE
  206. X.fi
  207. X.PD
  208. X.PP
  209. X.sh "Expert commands"
  210. XThe general format of expert commands is:
  211. X.PP
  212. X.I zoo
  213. X.RB { acDeghlLPTuUvVx }[ aAcCdEfImMnNoOpPqSu1:/.@n+\-= ]
  214. Xarchive [file] ...
  215. X.PP
  216. XThe characters enclosed within {} are commands.  Choose any one of
  217. Xthese.  The characters enclosed within [] just to the right of the {}
  218. Xare modifiers and zero or more of these may immediately follow the
  219. Xcommand character.  All combinations of command and modifier characters
  220. Xmay not be valid.
  221. X.PP
  222. XFiles are added to an archive with the command:
  223. X.PP
  224. X.I zoo 
  225. X.RB { au }[ cfIMnPqu:+\- ]
  226. Xarchive [file] ...
  227. X.PP
  228. XCommand characters are:
  229. X.PP
  230. X.TP
  231. X.B a
  232. XAdd each specified file to archive.  Any already-archived copy of 
  233. Xthe file is deleted if this is necessary to avoid exceeding the
  234. Xuser-specified limit on the number of generations of the
  235. Xfile to maintain in the archive.
  236. X.PP
  237. X.TP 
  238. X.B u
  239. XDo an update of the archive.  A specified file is added to the
  240. Xarchive only if a copy of it is already in the archive and the copy
  241. Xbeing added is newer than the copy already in the archive.  
  242. X.PP
  243. XThe following modifiers are specific to these commands.
  244. X.PP
  245. X.TP 
  246. X.B M
  247. XMove files to archive.  This makes 
  248. X.I zoo 
  249. Xdelete (unlink) the original files after they have been added to the
  250. Xarchive.  Files are deleted after addition of all files to the archive is
  251. Xcomplete and after any requested packing of the archive has been done,
  252. Xand only if 
  253. X.I zoo 
  254. Xdetected no errors.
  255. X.PP
  256. X.TP 
  257. X.B n
  258. XAdd new files only.  A specified file is added only if it isn't
  259. Xalready in the archive.
  260. X.PP
  261. X.TP 
  262. X.B P
  263. XPack archive after files have been added.  
  264. X.PP
  265. X.TP
  266. X.B u
  267. XApplied to the
  268. X.B a
  269. Xcommand, this modifier makes it behave identically to the
  270. X.B u
  271. Xcommand.
  272. X.sp 1
  273. XThe combination of the 
  274. X.B n
  275. Xmodifier with the
  276. X.B u
  277. Xmodifier or 
  278. X.B u
  279. Xcommand causes addition of a file to the archive either 
  280. Xif the file is not already in the archive, 
  281. X.I or 
  282. Xif the file is already in the archive but the archived
  283. Xcopy is older than the copy being added.
  284. X.PP
  285. X.TP
  286. X.B :
  287. XDo not store directory names.  In the absence of this modifier
  288. X.I zoo
  289. Xstores the full pathname of each archived file.
  290. X.PP
  291. X.TP
  292. X.B I
  293. XRead filenames to be archived from standard input.  
  294. X.I Zoo 
  295. Xwill read
  296. Xits standard input and assume that each line of text contains a
  297. Xfilename.  Under AmigaDOS and the **IX family, the entire line is used.
  298. XUnder MS-DOS and VAX/VMS,
  299. X.I zoo
  300. Xassumes that the filename is terminated by a blank, tab,
  301. Xor newline; thus it is permissible for the line of text to
  302. Xcontain more than one field separated by white space, and only the
  303. Xfirst field will be used.
  304. X.sp 1
  305. XUnder the **IX family of operating systems, 
  306. X.I zoo
  307. Xcan be used as follows in a pipeline:
  308. X.IP "" 10
  309. Xfind . \-print | 
  310. X.I zoo
  311. XaI sources
  312. X.IP "" 5
  313. X.sp 1
  314. XIf the
  315. X.B I
  316. Xmodifier is specified, no filenames may be supplied on the command
  317. Xline itself.
  318. X.PP
  319. X.TP
  320. X.BR + , \-
  321. XThese modifiers take effect only if the
  322. X.B a
  323. Xcommand results in the creation of a new archive.
  324. X.B +
  325. Xcauses any newly-created archive to have
  326. Xgenerations enabled.
  327. X.B \-
  328. Xis provided for symmetry and causes any newly-created
  329. Xarchive to have generations disabled;  this is also the
  330. Xdefault if neither
  331. X.B +
  332. Xnor
  333. X.B \-
  334. Xis specified.
  335. X.PP
  336. XFiles are extracted from an archive with the command:
  337. X.sp 1
  338. X.I zoo 
  339. X.RB { ex }[ dNoOpqS./@ ]
  340. Xarchive [file] ...
  341. X.PP
  342. XThe 
  343. X.B e 
  344. Xand 
  345. X.B x 
  346. Xcommands are synonymous.  If no file was specified, all files are
  347. Xextracted from the archive.
  348. X.PP
  349. XThe following modifiers are specific to the e and x commands:
  350. X.PP
  351. X.TP 
  352. X.B N
  353. XDo not save extracted data but report any errors encountered.  
  354. X.PP
  355. X.TP
  356. X.B O
  357. XOverwrite files.  Normally, if a file being extracted would 
  358. Xoverwrite an already-existing file of the same name, 
  359. X.I zoo 
  360. Xasks you if
  361. Xyou really want to overwrite it.  You may answer the question with
  362. X`y', which means yes, overwrite; or `n', which means no, don't
  363. Xoverwrite; or `a', which means assume the answer is `y' for this
  364. Xand all subsequent files.  The 
  365. X.B O 
  366. Xmodifier makes 
  367. X.I zoo
  368. Xassume that files may always be overwritten.  Neither
  369. Xanswering the question affirmatively nor using
  370. X.B O
  371. Xalone will cause read-only files to be overwritten.
  372. X.sp 1
  373. XOn **IX systems, however, doubling this modifier as
  374. X.B OO
  375. Xwill force
  376. X.I zoo
  377. Xto unconditionally overwrite any read-protected files 
  378. Xwith extracted files if it can do so.  
  379. X.sp 1
  380. XThe 
  381. X.B O, N, 
  382. Xand 
  383. X.B p 
  384. Xmodifiers are mutually exclusive.
  385. X.PP
  386. X.TP
  387. X.B S
  388. XSupersede newer files on disk with older extracted
  389. Xfiles.
  390. XUnless this modifier is used,
  391. X.I zoo
  392. Xwill not overwrite a newer existing file with an
  393. Xolder extracted file.
  394. X.PP
  395. X.TP
  396. X.B o    
  397. XThis is equivalent to the 
  398. X.B O 
  399. Xmodifier if and only if it
  400. Xis given at least twice.  It is otherwise ignored.
  401. X.PP
  402. X.TP
  403. X.B p    
  404. XPipe extracted data to standard output.  Error messages are piped to 
  405. Xstandard output as well.  However, if a bad CRC is detected, an error
  406. Xmessage is sent both to standard error and to standard output.
  407. X.PP
  408. X.TP
  409. X.B /
  410. XExtract to original pathname.  Any needed directories must already
  411. Xexist.  In the absence of this modifier all files are extracted into
  412. Xthe current directory.  If this modifier is doubled as
  413. X.BR // ,
  414. Xrequired directories need not exist and are created if necessary.
  415. X.PP
  416. XThe management of multiple generations of archived files
  417. Xis done with the commands:
  418. X.sp 1
  419. X.B zoo 
  420. X\fBgl\fR[\fR\fBAq\fR]{\fR\fB+\-=\fR}\fR\fBnumber
  421. X.B archive files ..
  422. X.sp 0
  423. X.B zoo 
  424. X\fBgc\fR[\fR\fBq\fR]{\fR\fB+\-=\fR}\fR\fBnumber
  425. X.B archive files ..
  426. X.sp 0
  427. X.B zoo 
  428. X.BR gA [ q ] "\- archive"
  429. X.sp 0
  430. X.B zoo 
  431. X.BR gA [ q ] "+ archive"
  432. X.sp 1
  433. XThe first form,
  434. X.BR gl ,
  435. Xadjusts the generation limit of selected files by the specified
  436. Xvalue.  If the form
  437. X.B "=n"
  438. Xis used, where n is a decimal number, this sets the generation
  439. Xlimit to the
  440. Xspecified value.  If
  441. X.B +
  442. Xor
  443. X.B \-
  444. Xare used in placed of 
  445. X.B =
  446. Xthe effect is to increment or decrement the generation limit
  447. Xby the specified value.  For example, the command
  448. X.IP "" 5
  449. X.B "zoo gl=5 xyz :"
  450. X.IP "" 0
  451. Xsets the generation limit of each file in the archive
  452. X.B xyz.zoo
  453. Xto a value of 5.  The command
  454. X.IP "" 5
  455. X.B "zoo gl\-3 xyz :"
  456. X.IP "" 0
  457. Xdecrements the generation limit of each file in the archive
  458. Xto 3 less than it currently is.
  459. X.sp 1
  460. XIf the
  461. X.B A
  462. Xmodifier is used, the archive-wide generation limit is
  463. Xadjusted instead.
  464. X.sp 1
  465. XThe number of generations of a file maintained in an archive
  466. Xis limited by the file generation
  467. Xlimit, or the archive generation limit, whichever is lower.
  468. XAs a special case, a generation limit of 0 stands for
  469. Xno limit.  Thus the default file generation limit of
  470. X0 and archive generation limit of 1 limits the number
  471. Xof generations of each file in a newly-created archive to one.
  472. X.sp 1
  473. XThe generation limit specified should be in the range
  474. X0 through 15;  any higher numbers are interpreted modulo
  475. X16.
  476. X.PP
  477. XThe second form of the command, using
  478. X.BR gc ,
  479. Xadjusts the generation count of selected files.  Each file
  480. Xhas a generation count of 1 when it is first added to
  481. Xan archive.  Each time a file by the same name is added
  482. Xagain to an archive, it receives a generation count
  483. Xthat is one higher than the highest generation count
  484. Xof the archived copy of the file.  The permissible 
  485. Xrange of generation counts is 1 through 65535.
  486. XIf repeated manipulations
  487. Xof an archive result in files having very high generation
  488. Xcounts, they may be set back to lower numbers with the
  489. X.B gc
  490. Xcommand.  The syntax of the command is analogous to
  491. Xthe syntax of the 
  492. X.B gl
  493. Xcommand, except that the 
  494. X.B A
  495. Xmodifier is not applicable to the
  496. X.B gc
  497. Xcommand.
  498. X.PP
  499. XThe third form,
  500. X.BR "gA\-" ,
  501. Xdisables generations in an archive.  Generations are
  502. Xoff when an archive is first created, but may be enabled
  503. Xwith the fourth form of the command,
  504. X.BR "gA+" .
  505. XWhen generations are disabled in an archive,
  506. X.I zoo
  507. Xwill not display generation numbers in archive listings
  508. Xor maintain multiple generations.  Generations can
  509. Xbe re-enabled at any time, though manipulation
  510. Xof an archive with repeated interspersed 
  511. X.B "gA\-"
  512. Xand 
  513. X.B "gA+"
  514. Xcommands may result in an archive whose
  515. Xbehavior is not easily understandable.
  516. X.PP
  517. XArchived files are listed with the command:
  518. X.sp 1
  519. X.I zoo
  520. X.RB { lLvV }[ aAcCdfgmqvV@/1+\- ] 
  521. X.RB archive[ .zoo ]
  522. X[file] ...
  523. X.PP
  524. X.TP
  525. X.B l
  526. XInformation presented includes the date and time of each file, its
  527. Xoriginal and current (compressed) sizes, and the percentage
  528. Xsize decrease due to compression (labelled CF or compression factor).
  529. XIf a file was added to the archive in a different timezone,
  530. Xthe difference between timezones is shown in hours as a signed
  531. Xnumber.  As an example, if the difference is listed as +3, this
  532. Xmeans that the file was added to the archive in a timezone
  533. Xthat is 3 hours west of the current timezone.  The file time
  534. Xlisted is, however, always the original timestamp of the
  535. Xarchived file, as observed by the user who archived the file,
  536. Xexpressed as that user's local time.  (Timezone information
  537. Xis stored and displayed only if the underlying operating
  538. Xsystem knows about timezones.)
  539. X.sp 1
  540. XIf no filename is supplied all files are listed except deleted files.
  541. X.sp 1
  542. X.I Zoo
  543. Xselects which generation(s) of a file to list according to
  544. Xthe following algorithm.
  545. X.sp 1
  546. XIf no filename is supplied, only the latest generation of
  547. Xeach file is listed.  If any filenames are specified,
  548. Xand a generation is specified for an argument, only
  549. Xthe requested generation is listed.  If a filename
  550. Xis specified ending with the generation character
  551. X(`:' or `;'), all generations of that file
  552. Xare listed.  Thus a filename argument of the form
  553. X.B zoo.c
  554. Xwill cause only the latest generation of
  555. X.I zoo.c
  556. Xto be listed;  an argument of the form
  557. X.B "zoo.c:4"
  558. Xwill cause generation 4 of
  559. X.I zoo.c 
  560. Xto be listed;  and an argument of the form
  561. X.B "zoo.c:"
  562. Xor
  563. X.B "zoo.c:*"
  564. Xwill cause all generations of
  565. X.I zoo.c
  566. Xto be listed.
  567. X.PP
  568. X.TP
  569. X.B L
  570. XThis is similar to the
  571. X.B l
  572. Xcommand except that all supplied arguments must be archives and all
  573. Xnon-deleted generations of all files in each archive appear in
  574. Xthe listing.
  575. X.sp 1
  576. XOn **IX systems, on which the shell expands arguments, if multiple
  577. Xarchives are to be listed, the
  578. X.B L
  579. Xcommand must be used.  On other systems (VAX/VMS, AmigaDOS,
  580. XMSDOS) on which wildcard expansion is done internally by
  581. X.I zoo,
  582. Xwildcards may be used in the archive name, and a multiple
  583. Xarchive listing obtained, using the
  584. X.B l
  585. Xcommand.
  586. X.PP
  587. X.TP
  588. X.B v
  589. XThis causes any comment attached to the archive to
  590. Xbe listed in addition to the other information.
  591. X.PP
  592. X.TP
  593. X.B V
  594. XThis causes any comment attached to the archive and also any
  595. Xcomment attached to each file to be listed.
  596. X.sp 1
  597. XBoth the
  598. X.B V
  599. Xand
  600. X.B v
  601. Xcommand characters can also be used as modifiers to
  602. Xthe
  603. X.B l
  604. Xand
  605. X.B L
  606. Xcommands.
  607. X.PP
  608. XIn addition to the general modifiers described later, the following 
  609. Xmodifiers can be applied to the archive list commands.
  610. X.PP
  611. X.TP
  612. X.B a
  613. XThis gives a single-line format containing both each filename and the
  614. Xname of the archive, sorted by archive name.  It is especially useful
  615. Xwith the
  616. X.B L
  617. Xcommand, since the result can be further sorted on any field to give a
  618. Xmaster listing of the entire contents of a set of archives.
  619. X.PP
  620. X.TP
  621. X.B A
  622. XThis causes any comment attached to the archive to be listed.
  623. X.PP
  624. X.TP
  625. X.B g
  626. XThis modifier causes file generation information to
  627. Xbe listed about the archive.  For each file listed, the
  628. Xuser-specified generation limit, if any, is listed.  For
  629. Xexample, `3g' for a file means that the user wants no more
  630. Xthan three generations of the file to be kept.  In archives
  631. Xcreated by older versions of
  632. X.I zoo,
  633. Xthe listing will show `\-g',
  634. Xmeaning that no generation information is kept and multiple
  635. Xgenerations of the file are not being maintained.
  636. X.sp 1
  637. XIn addition to the generation information for each file,
  638. Xthe archive-wide generation limit, if any, is shown
  639. Xat the end of the listing.  If generations have been
  640. Xdisabled by the user, this is so indicated, for example:
  641. X.IP "" 10
  642. XArchive generation limit is 3 (generations off).
  643. X.IP "" 5
  644. XFor more information about generations see the
  645. Xdescription of the
  646. X.B g
  647. Xcommand.
  648. X.PP
  649. X.TP
  650. X.B m
  651. XThis modifier is currently applicable to **IX systems only.
  652. XIt causes the mode bits (file protection code) of each
  653. Xfile to be listed as a three-digit octal number.  Currently 
  654. X.I zoo
  655. Xpreserves only the lowest nine mode bits.  Their meanings
  656. Xare as described in the **IX documentation for the
  657. X.I chmod(1)
  658. Xcommand.
  659. X.PP
  660. X.TP
  661. X.B C
  662. XThis modifier causes the stored cyclic redundancy code (CRC) 
  663. Xfor each archived file to be shown as a four-digit hexadecimal 
  664. Xnumber.
  665. X.PP
  666. X.TP
  667. X.B 1
  668. XThis forces one filename to be listed per line.  It is most useful
  669. Xin combination with the
  670. X.B f
  671. Xmodifier.
  672. X.TP
  673. X.B /
  674. XThis forces any directory name to be always listed, even in
  675. Xfast columnized listings that do not normally include any
  676. Xdirectory names.
  677. X.PP
  678. X.TP
  679. X.BR + , \-
  680. XThe
  681. X.B \-
  682. Xmodifier causes trailing generation numbers to be
  683. Xomitted from filenames.
  684. XThe
  685. X.B +
  686. Xmodifier causes the trailing generation numbers to be
  687. Xshown, which is also the default if neither
  688. X.B \-
  689. Xnor 
  690. X.B +
  691. Xis specified.
  692. X.PP
  693. XFiles may be deleted and undeleted from an archive with the following
  694. Xcommands:
  695. X.sp 1
  696. X.I zoo
  697. X.RB { DU }[ Pq1 ]
  698. Xarchive file ...
  699. X.PP
  700. XThe 
  701. X.B D
  702. Xcommand deletes the specified files and the 
  703. X.B U
  704. Xcommand undeletes the specified files.  The
  705. X.B 1
  706. Xmodifier (the digit one, not the letter ell) forces deletion or undeletion
  707. Xof at most one file.  If multiple instances of the same file exist
  708. Xin an archive, use of the
  709. X.B 1
  710. Xmodifier may allow selective extraction of one of these.
  711. X.PP
  712. XComments may be added to an archive with the command:
  713. X.sp 1
  714. X.I zoo
  715. X.BR c [ A ]
  716. Xarchive
  717. X.PP
  718. XWithout the modifier
  719. X.BR A ,
  720. Xthis behaves identically to the
  721. X.B \-comment
  722. Xcommand.  With the modifier
  723. X.BR A ,
  724. Xthe command serves to add or update the comment attached
  725. Xto the archive as a whole.  This comment may be listed with
  726. Xthe
  727. X.B lA, LA, v, and V
  728. Xcommands.  Applying the
  729. X.B cA
  730. Xcommand to an archive that was created with an older version
  731. Xof
  732. X.I zoo
  733. Xwill result in an error message requesting that the user
  734. Xfirst pack the archive with the
  735. X.B P
  736. Xcommand.  This reorganizes the archive and creates space
  737. Xfor the archive comment.
  738. X.PP
  739. XThe timestamp of an archive may be adjusted with the command:
  740. X.sp 1
  741. X.I zoo
  742. X.BR T [ q ]
  743. Xarchive
  744. X.PP
  745. X.I Zoo 
  746. Xnormally attempts to maintain the timestamp of an archive to reflect
  747. Xthe age of the newest file stored in it.  Should the timestamp ever be
  748. Xincorrect it can be fixed with the
  749. X.B T
  750. Xcommand.
  751. X.PP
  752. XAn archive may be packed with the command:
  753. X.sp 1
  754. X.I zoo
  755. X.BR P [ EPq ]
  756. Xarchive
  757. X.PP
  758. XIf the backup copy of the archive already exists, 
  759. X.I zoo
  760. Xwill refuse to
  761. Xpack the archive unless the
  762. X.B P
  763. Xmodifier is also given.  The
  764. X.B E
  765. Xmodifier causes 
  766. X.I zoo
  767. Xnot to save a backup copy of the original archive
  768. Xafter packing.  A unique temporary file in the current directory
  769. Xis used to initially hold the packed archive.  This file will be
  770. Xleft behind if packing is interrupted or if for some reason this
  771. Xfile cannot be renamed to the name of the original archive when
  772. Xpacking is complete.
  773. X.PP
  774. XPacking removes any garbage data appended to an archive because of
  775. XXmodem file transfer and also recovers any wasted space
  776. Xremaining in an archive that has been frequently updated
  777. Xor in which comments were replaced.  Packing also updates
  778. Xthe format of any archive that was created by an older 
  779. Xversion of
  780. X.I zoo
  781. Xso that newer features (e.g. archive-wide generation limit,
  782. Xarchive comment) become fully available.
  783. X.PP
  784. X.I Zoo
  785. Xcan act as a pure compression or uncompression filter,
  786. Xreading from standard input and writing to standard output.
  787. XThis is achieved with the command:
  788. X.sp 1
  789. X.I zoo
  790. X.BR f { cu }
  791. X.PP
  792. Xwhere
  793. X.B c
  794. Xspecifies compression and
  795. X.B u
  796. Xspecifies uncompression.  A CRC value is used to check the
  797. Xintegrity of the data.  The compressed data stream has
  798. Xno internal archive structure and contains multiple
  799. Xfiles only if the input data stream was already structured,
  800. Xas might be obtained, for example, from
  801. X.I tar
  802. Xor
  803. X.I cpio.
  804. X.PP
  805. X Modem transfers can be speeded up with these commands:
  806. X.IP "" 10
  807. X.I zoo
  808. X.B fc
  809. X< file |
  810. X.I sz ...
  811. X.I rz |
  812. X.I zoo
  813. X.B fu
  814. X> file
  815. X.IP "" 5
  816. X.PP
  817. X.sh "General modifiers"
  818. X.PP
  819. XThe following modifiers are applicable to several commands:
  820. X.PP
  821. X.TP 
  822. X.B c
  823. XApplied to the
  824. X.B a
  825. Xand
  826. X.B u
  827. Xcommands, this causes the user to be prompted 
  828. Xfor a comment for each file added to the archive.  If the file
  829. Xbeing added has replaced, or is a newer generation of,
  830. Xa file already in the archive, any comment
  831. Xattached to that file is shown to the user and becomes
  832. Xattached to the newly-added file unless the user changes it.
  833. XPossible user responses are as described for the
  834. X.B \-comment
  835. Xcommand.  Applied to the archive list command
  836. X.BR l ,
  837. Xthe 
  838. X.B c
  839. Xmodifier causes the listing of any comments attached to archived files.
  840. X.PP
  841. X.TP
  842. X.BR \ .
  843. XIn conjunction with
  844. X.B /
  845. Xor
  846. X.B //
  847. Xthis modifier causes any extracted pathname beginning with `/' to be
  848. Xinterpreted relative to the current directory, resulting in 
  849. Xthe possible creation of a subtree rooted at the current directory.
  850. XIn conjunction with the command
  851. X.B P
  852. Xthe
  853. X.B .
  854. Xmodifier causes the packed archive to be created in the current
  855. Xdirectory.  This is intended to allow users with limited disk
  856. Xspace but multiple disk drives to pack large archives.
  857. X.PP
  858. X.TP 
  859. X.B d
  860. XMost commands that act on an archive act only on files that are
  861. Xnot deleted.  The
  862. X.B d
  863. Xmodifier makes commands act on both normal and deleted files.  If
  864. Xdoubled as
  865. X.BR dd ,
  866. Xthis modifier forces selection only of deleted files. 
  867. X.PP
  868. X.TP
  869. X.B f
  870. XApplied to the
  871. X.B a
  872. Xand
  873. X.B u
  874. Xcommands, the
  875. X.B f
  876. Xmodifier causes fast archiving by adding files without compression.
  877. XApplied to
  878. X.B l
  879. Xit causes a fast listing of files in a multicolumn format.
  880. X.PP
  881. X.TP 
  882. X.B q
  883. XBe quiet.  Normally 
  884. X.I zoo
  885. Xlists the name of each file and what action it is performing.  The
  886. X.B q
  887. Xmodifier suppresses this.  When files are being extracted to standard
  888. Xoutput, the
  889. X.B q
  890. Xmodifier suppresses the header preceding each file.  When archive
  891. Xcontents are being listed, this modifier suppresses any header
  892. Xand trailer.  When a fast columnized listing is being obtained,
  893. Xthis modifier causes all output to be combined into a single set
  894. Xof filenames for all archives being listed.
  895. X.sp 1
  896. XWhen doubled as
  897. X.BR qq ,
  898. Xthis modifier suppresses WARNING messages, and when tripled as
  899. X.BR qqq ,
  900. XERROR messages are suppressed too.  FATAL error messages
  901. Xare never suppressed.
  902. X.PP
  903. X.sh "Recovering data from damaged archives"
  904. XThe
  905. X.B @
  906. Xmodifier allows the user to specify the exact position in
  907. Xan archive where
  908. X.I zoo
  909. Xshould extract a file from, allowing damaged portions
  910. Xof an archive to be skipped.
  911. XThis modifier must be immediately followed by a decimal
  912. Xinteger without intervening spaces, and possibly by
  913. Xa comma and another decimal integer, giving a command of
  914. Xthe form
  915. X.B l@m
  916. Xor
  917. X.B l@m,n
  918. X(to list archive contents)
  919. Xor
  920. X.B x@m
  921. Xor
  922. X.B x@m,n
  923. X(to extract files from an archive).  Listing or extraction
  924. Xbegin at position 
  925. X.B m
  926. Xin the archive.
  927. XThe value of
  928. X.B m
  929. Xmust be the position within the archive of an
  930. Xundamaged directory entry.  This position is usually obtained from
  931. X.I fiz(1)
  932. Xversion 2.0 or later.
  933. X.sp 1
  934. XIf damage to the archive has shortened or lengthened it, all
  935. Xpositions within the archive may be changed by some constant amount.
  936. XTo compensate for this, the value of
  937. X.B n
  938. Xmay be specified.  This value is also usually obtained from
  939. X.I fiz(1).
  940. XIt should be the position in the archive of the file data
  941. Xcorresponding to the directory entry that has been specified
  942. Xwith 
  943. X.BR m .
  944. XThus if the command
  945. X.B x@456,575
  946. Xis given, it will cause the first 456 bytes of the archive to
  947. Xbe skipped and extraction to begin at offset 456;  in addition,
  948. X.I zoo
  949. Xwill attempt to extract the file data from position 575 in the archive
  950. Xinstead of the value that is found in the directory entry
  951. Xread from the archive.
  952. XFor example, here is some of the output of 
  953. X.I fiz
  954. Xwhen it acts on a damaged 
  955. X.I zoo
  956. Xarchive:
  957. X.sp 1
  958. X.nf
  959. X****************
  960. X    2526: DIR  [changes] ==>   95
  961. X    2587: DATA
  962. X****************
  963. X    3909: DIR  [copyrite] ==> 1478
  964. X    3970: DATA
  965. X    4769: DATA
  966. X****************
  967. X.fi
  968. X.sp 1
  969. XIn such output, 
  970. X.B DIR
  971. Xindicates where 
  972. X.I fiz
  973. Xfound a directory entry in the archive, and
  974. X.B DATA
  975. Xindicates where 
  976. X.I fiz
  977. Xfound file data in the archive.  Filenames located by
  978. X.I fiz
  979. Xare enclosed in square brackets, and the notation
  980. X"==>   95" indicates that the directory entry found by
  981. X.I fiz
  982. Xat position 2526 has a file data pointer to
  983. Xposition 95.  (This is clearly wrong,
  984. Xsince file data always occur in an archive 
  985. X.I after
  986. Xtheir directory entry.)  In actuality,
  987. X.I fiz
  988. Xfound file data at positions 2587, 3970, and
  989. X4769.  Since 
  990. X.I fiz
  991. Xfound only two directory entries, and each directory entry
  992. Xcorresponds to one
  993. Xfile, one of the file data positions is an artifact.
  994. X.PP
  995. X.sp 1
  996. XIn this case, commands to try giving to 
  997. X.I zoo
  998. Xmight be
  999. X.B x@2526,2587
  1000. X(extract beginning at position 2526, and get file data
  1001. Xfrom position 2587),
  1002. X.B x@3090,3970
  1003. X(extract at 3090, get data from 3970)
  1004. Xand
  1005. X.B x@3909,4769
  1006. X(extract at 3909, get data from 4769).  Once a correctly-matched
  1007. Xdirectory entry/file data pair is found,
  1008. X.I zoo
  1009. Xwill in most cases synchronize with and correctly extract all files
  1010. Xsubsequently found in the archive.  Trial and error should allow
  1011. Xall undamaged files to be extracted.
  1012. XAlso note that self-extracting archives created using
  1013. X.I sez
  1014. X(the Self-Extracting
  1015. X.I Zoo
  1016. Xutility for MS-DOS), which are normally executed on an MS-DOS
  1017. Xsystem for extraction, can
  1018. Xbe extracted on non-MSDOS systems using 
  1019. X.I "zoo's"
  1020. Xdamaged-archive recovery method using the
  1021. X.B @
  1022. Xmodifier.
  1023. X.PP
  1024. X.sh "Wildcard handling"
  1025. XUnder the **IX family of operating systems, 
  1026. Xthe shell normally expands wildcards to a list of matching files.  Wildcards 
  1027. Xthat are meant to match files within an archive must therefore
  1028. Xbe escaped or quoted.  When selecting files to be added to an archive,
  1029. Xwildcard conventions are as defined for the shell.  When selecting
  1030. Xfiles from within an archive, wildcard handling is done by
  1031. X.I zoo
  1032. Xas described below.
  1033. X.PP
  1034. XUnder MS-DOS and AmigaDOS, quoting of wildcards is not needed.
  1035. XAll wildcard expansion of filenames is done by
  1036. X.I zoo,
  1037. Xand wildcards inside directory names are expanded only
  1038. Xwhen listing or extracting files but not when adding them.
  1039. X.PP
  1040. XThe wildcard syntax interpreted by 
  1041. X.I zoo
  1042. Xis limited to the following characters.
  1043. X.PP
  1044. X.TP
  1045. X.B *
  1046. XMatches any sequence of zero or more characters.
  1047. X.PP
  1048. X.TP
  1049. X.B \?
  1050. XMatches any single character.
  1051. X.sp 1
  1052. XArbitrary combinations of 
  1053. X.B *
  1054. Xand 
  1055. X.B ?
  1056. Xare allowed.
  1057. X.PP
  1058. X.TP
  1059. X.B /
  1060. XIf a supplied pattern contains a slash anywhere in it, then the
  1061. Xslash separating any directory prefix from the filename must be
  1062. Xmatched explicitly.  If a supplied pattern contains
  1063. Xno slashes, the match is selective only on the filename.
  1064. X.PP
  1065. X.TP
  1066. X.B c\-c
  1067. XTwo characters separated by a hyphen specify a character range.  All
  1068. Xfilenames beginning with those characters will match.  The character
  1069. Xrange is meaningful only by itself or preceded by a directory name.
  1070. XIt is not specially interpreted if it is part of a filename.
  1071. X.PP
  1072. X.TP
  1073. X.B ": and ;"
  1074. XThese characters are used to separate a filename from a generation
  1075. Xnumber and are used when selecting specific generations
  1076. Xof archived files.  If no generation character is used, the
  1077. Xfilename specified matches only the latest generation of the
  1078. Xfile.  If the generation character is specified,
  1079. Xthe filename and the generation are matched independently by
  1080. X.I "zoo's"
  1081. Xwildcard mechanism.  If no generation is
  1082. Xspecified following the
  1083. X.B ":"
  1084. Xor
  1085. X.B ";"
  1086. Xcharacter, all generations of that file will match.  As
  1087. Xa special case, a generation number of
  1088. X.B 0
  1089. Xmatches only the latest generation of a file, while
  1090. X.B ^0
  1091. Xmatches all generations of a file except the
  1092. Xlatest one.  If no
  1093. Xfilename is specified preceding the generation character,
  1094. Xall filenames will match.  As a corollary, the generation
  1095. Xcharacter by itself matches all generations of all files.
  1096. X.PP
  1097. XMS-DOS users should note that 
  1098. X.I zoo 
  1099. Xdoes not treat the dot as
  1100. Xa special character, and it does not ignore characters following
  1101. Xan asterisk.  Thus 
  1102. X.B * 
  1103. Xmatches all filenames;
  1104. X.B *.* 
  1105. Xmatches
  1106. Xfilenames containing a dot;
  1107. X.B *_* 
  1108. Xmatches filenames
  1109. Xcontaining an underscore;  and 
  1110. X.B *z 
  1111. Xmatches all filenames
  1112. Xthat end with the character 
  1113. X.BR z ,
  1114. Xwhether or not they contain
  1115. Xa dot.
  1116. X.PP
  1117. X.sh "Usage hints"
  1118. XThe Novice command set in
  1119. X.I zoo
  1120. Xis meant to provide an interface with functionality and
  1121. Xformat that will be familiar to users of other similar
  1122. Xarchive utilities.  In keeping with this objective,
  1123. Xthe Novice commands do not maintain or use any subdirectory
  1124. Xinformation or allow the use of
  1125. X.I "zoo's"
  1126. Xability to maintain multiple generations of files.
  1127. XFor this reason, users should switch to exclusively
  1128. Xusing the Expert commands as soon as possible.
  1129. X.PP
  1130. XAlthough the Expert command set is quite large, it should
  1131. Xbe noted that in almost every case, all legal modifiers
  1132. Xfor a command are fully orthogonal.  This means that the
  1133. Xuser can select any combination of modifiers, and when they
  1134. Xact together, they will have the intuitively obvious effect.
  1135. XThus the user need only memorize what each modifier does,
  1136. Xand then can combine them as needed without much further thought.
  1137. X.PP
  1138. XFor example, consider the 
  1139. X.B a
  1140. Xcommand which is used to add files to an archive.  By itself,
  1141. Xit simply adds the specified files.  To cause only already-archived
  1142. Xfiles to be updated if their disk copies have been modified,
  1143. Xit is only necessary to add the
  1144. X.B u
  1145. Xmodifier, making the command
  1146. X.BR au .
  1147. XTo cause only new files (i.e., files not already in
  1148. Xthe archive) to be added, the
  1149. X.B n
  1150. Xmodifier is used to create the command
  1151. X.BR an .
  1152. XTo cause 
  1153. X.I both
  1154. Xalready-archived files to be updated and new files
  1155. Xto be added, the
  1156. X.B u
  1157. Xand
  1158. X.B n
  1159. Xmodifiers can be used together, giving the command
  1160. X.BR aun .
  1161. XSince the order of modifiers is not significant, the
  1162. Xcommand could also be
  1163. X.BR anu .
  1164. X.PP
  1165. XFurther, the
  1166. X.B c
  1167. Xmodifier can be used to cause
  1168. X.I zoo
  1169. Xto prompt the user for a comment to attach to
  1170. Xeach file added.  And the
  1171. X.B f
  1172. Xmodifier can cause fast addition (addition without
  1173. Xcompression).  It should be obvious then that the
  1174. Xcommand
  1175. X.B auncf
  1176. Xwill cause
  1177. X.I zoo
  1178. Xto update already-archived files, add new files,
  1179. Xprompt the user for comments, and do the addition
  1180. Xof files without any compression.  Furthermore,
  1181. Xif the user wishes to move files to the archive,
  1182. Xi.e., delete the disk copy of each file after it
  1183. Xis added to the archive, it is only necessary to add
  1184. Xthe
  1185. X.B M
  1186. Xmodifier to the command, so it becomes
  1187. X.BR auncfM .
  1188. XAnd if the user also wishes to cause the archive
  1189. Xto be packed as part of the command, thus recovering
  1190. Xspace from any files that are replaced, the command
  1191. Xcan be modified to
  1192. X.B auncfMP
  1193. Xby adding the
  1194. X.B P
  1195. Xmodifier that causes packing.
  1196. X.PP
  1197. XSimilarly, the archive listing commands can be built up
  1198. Xby combining modifiers.  The basic command to list the
  1199. Xcontents of an archive is
  1200. X.BR l .
  1201. XIf the user wants a fast columnized listing, the
  1202. X.B f 
  1203. Xmodifier can be added to give the
  1204. X.B lf
  1205. Xcommand.  Since this listing will have a header giving
  1206. Xthe archive name and a trailer summarizing interesting
  1207. Xinformation about the archive, such as the number
  1208. Xof deleted files, the user may wish to "quieten" the
  1209. Xlisting by suppressing these;  the relevant modifier
  1210. Xis
  1211. X.BR q ,
  1212. Xwhich when added to the command gives
  1213. X.BR lfq .
  1214. XIf the user wishes to see the **IX mode (file protection)
  1215. Xbits, and also information about multiple generations,
  1216. Xthe modifiers
  1217. X.B m
  1218. X(show mode bits) and
  1219. X.B g
  1220. X(show generation information) can be added, giving the
  1221. Xcommand
  1222. X.BR lfqmg .
  1223. XIf the user also wishes to see an attached archive
  1224. Xcomment, the modifier
  1225. X.B A
  1226. X(for archive) will serve.  Thus the command
  1227. X.B lfqmgA
  1228. Xwill give a fast columnized listing of the archive,
  1229. Xsuppressing any header and trailer, showing mode bits
  1230. Xand generation information, and showing any comment
  1231. Xattached to the archive as a whole.  If in addition
  1232. Xindividual comments attached to files are also needed,
  1233. Xsimply append the
  1234. X.B c
  1235. Xmodifier to the command, making it
  1236. X.BR lfqmgAc .
  1237. XThe above command will not show any deleted files, 
  1238. Xhowever;  to see them, use the
  1239. X.B d
  1240. Xmodifier, making the command
  1241. X.B lfqmgAcd
  1242. X(or double it as in
  1243. X.B lfqmgAcdd
  1244. Xif 
  1245. X.I only 
  1246. Xthe deleted files are to be listed).  And if the user
  1247. Xalso wishes to see the CRC value for each file being listed,
  1248. Xthe modifier
  1249. X.B C
  1250. Xwill do this, as in the command
  1251. X.BR lfqmgAcdC ,
  1252. Xwhich gives a fast columnized listing of all files, including
  1253. Xdeleted files, showing any archive comment and file comments,
  1254. Xand file protection codes and generation information, as
  1255. Xwell as the CRC value of each file.
  1256. X.PP
  1257. XNote that the above command
  1258. X.B lfqmgAcdC
  1259. Xcould also be abbreviated to
  1260. X.B VfqmgdC
  1261. Xbecause the command
  1262. X.B V
  1263. Xis shorthand for
  1264. X.B lcA 
  1265. X(archive listing with all comments shown).
  1266. XSimilarly the command
  1267. X.B v
  1268. Xis shorthand for
  1269. X.BR lA
  1270. X(archive listing with archive comment shown).  Both
  1271. X.B V
  1272. Xand 
  1273. X.B v
  1274. Xcan be used as modifiers to any of the other archive
  1275. Xlisting commands.
  1276. X.PP
  1277. X.sh "Generations"
  1278. XBy default,
  1279. X.I zoo
  1280. Xassumes that only the latest generation of a specified file
  1281. Xis needed.  If generations other than the latest one
  1282. Xneed to be selected, this may be done by specifying them
  1283. Xin the filename.  For example, the name
  1284. X.B stdio.h
  1285. Xwould normally refer to the latest generation of
  1286. Xthe file
  1287. X.I stdio.h
  1288. Xstored in a 
  1289. X.I zoo
  1290. Xarchive.  To get an archive listing showing all
  1291. Xgenerations of
  1292. X.I stdio.h 
  1293. Xin the archive, the specification
  1294. X.B stdio.h:*
  1295. Xcould be used (enclosed in single quotes if necessary
  1296. Xto protect the wildcard character
  1297. X.B *
  1298. Xfrom the shell).  Also,
  1299. X.B stdio.h:0
  1300. Xselects only the latest generation of
  1301. X.I stdio.h,
  1302. Xwhile
  1303. X.B stdio.h:^0
  1304. Xselects all generations except the latest one.  The 
  1305. X.B :
  1306. Xcharacter here separates the filename from the generation
  1307. Xnumber, and the character
  1308. X.B *
  1309. Xis a wildcard that matches all possible generations.
  1310. XFor convenience, the generation itself may be left
  1311. Xout, so that the name
  1312. X.B stdio.h:
  1313. X(with the
  1314. X.B :
  1315. Xbut without a generation number or a wildcard) matches
  1316. Xall generations exactly as
  1317. X.B stdio.h:*
  1318. Xdoes.
  1319. X.PP
  1320. XIf a generation is specified but no filename is present,
  1321. Xas in
  1322. X.BR :5 ,
  1323. X.BR :* ,
  1324. Xor just
  1325. X.BR : ,
  1326. Xall filenames of the specified generation will be selected.
  1327. XThus
  1328. X.B :5
  1329. Xselects generation 5 of each file, and
  1330. X.B :*
  1331. Xand
  1332. X.B :
  1333. Xselect all generations of all files.
  1334. X.PP
  1335. XIt is important to note that
  1336. X.I "zoo's"
  1337. Xidea of the latest generation of a file is not based
  1338. Xupon searching the entire archive.  Instead, whenever
  1339. X.I zoo
  1340. Xadds a file to an archive, it is marked
  1341. Xas being the latest generation.  Thus, if
  1342. Xthe latest generation of a file is deleted, then
  1343. X.I no
  1344. Xgeneration of that file is considered the latest any
  1345. Xmore.  This can be surprising to the user.  For
  1346. Xexample, if an archive already contains the file
  1347. X.I stdio.h:5
  1348. Xand a new copy is added, appearing in the archive
  1349. Xlisting as
  1350. X.I stdio.h:6,
  1351. Xand then
  1352. X.I stdio.h:6
  1353. Xis deleted, the remaining copy
  1354. X.I stdio.h:5
  1355. Xwill no longer be considered to be the latest generation,
  1356. Xand the file
  1357. X.I stdio.h:5,
  1358. Xeven if undeleted, will no longer appear in an archive listing
  1359. Xunless generation 5 (or every generation) is specifically requested.
  1360. XThis behavior will likely be improved in future releases of
  1361. X.I zoo.
  1362. X.SH FILES
  1363. XxXXXXXX \- temporary file used during packing
  1364. X.sp 0
  1365. X.RB archive_name. bak
  1366. X\- backup of archive
  1367. X.SH "SEE ALSO"
  1368. Xcompress(1), fiz(1)
  1369. X.SH BUGS
  1370. XWhen files are being added to an archive on a non-MS-DOS system, it
  1371. Xis possible for
  1372. X.I zoo
  1373. Xto fail to detect a full disk and hence create an invalid archive.
  1374. XThis bug will be fixed in a future release.
  1375. X.PP
  1376. XFiles with generation counts that wrap around from 65535 to 1
  1377. Xare not currently handled correctly.  If a file's generation
  1378. Xcount reaches a value close to 65535, it should be manually
  1379. Xset back down to a low number.  This may be easily done
  1380. Xwith a command such as
  1381. X.BR gc\-65000 ,
  1382. Xwhich subtracts 65000 from the generation count of each
  1383. Xspecified file.  This problem will be fixed in a
  1384. Xfuture release.
  1385. X.PP
  1386. XAlthough
  1387. X.I zoo
  1388. Xon **IX systems preserves the lowest nine mode bits of
  1389. Xregular files, it does not currently do the same for directories.
  1390. X.PP
  1391. XCurrently
  1392. X.I "zoo's"
  1393. Xhandling of the characters
  1394. X.B :
  1395. Xand 
  1396. X.B ;
  1397. Xin filenames is not robust, because it interprets these
  1398. Xto separate a filename from a generation number.  A
  1399. Xquoting mechanism will eventually be implemented.
  1400. X.PP
  1401. XStandard input cannot be archived nor can a created archive be sent
  1402. Xto standard output.  Spurious error messages may appear if the 
  1403. Xfilename of an archive is too long.
  1404. X.PP
  1405. XSince
  1406. X.I zoo
  1407. Xnever archives any file with the same name as the archive or its
  1408. Xbackup (regardless of any path prefixes), care should be taken 
  1409. Xto make sure that a file to be archived does not coincidentally have 
  1410. Xthe same name as the archive it is being added to.
  1411. XIt usually suffices 
  1412. Xto make sure that no file being archived is itself a 
  1413. X.I zoo
  1414. Xarchive.  (Previous versions of
  1415. X.I zoo
  1416. Xsometimes tried to add an
  1417. Xarchive to itself. This bug now seems to be fixed.)
  1418. X.PP
  1419. XOnly regular files are archived; devices and empty directories are not.
  1420. XSupport for archiving empty directories and for preserving directory
  1421. Xattributes is planned for the near future.
  1422. X.PP
  1423. XEarly versions of MS-DOS have a bug that prevents "." from referring
  1424. Xto the root directory;  this leads to anomalous results if the
  1425. Xextraction of paths beginning with a dot is attempted.
  1426. X.PP
  1427. XVAX/VMS destroys case information unless arguments are enclosed
  1428. Xin double quotes.  For this reason if a command given to
  1429. X.I zoo
  1430. Xon a VAX/VMS system includes any uppercase characters, it must be 
  1431. Xenclosed in double quotes.  Under VAX/VMS,
  1432. X.I zoo
  1433. Xdoes not currently restore file timestamps;  this will be fixed
  1434. Xas soon as I figure out RMS extended attribute blocks, or DEC supplies
  1435. Xa utime() function, whichever occurs first.  Other VMS bugs, related to
  1436. Xfile structures, can often be overcome by using the program 
  1437. X.I bilf.c
  1438. Xthat is supplied with
  1439. X.I zoo.
  1440. X.PP
  1441. XIt is not currently possible to create a
  1442. X.I zoo
  1443. Xarchive containing all
  1444. X.I zoo
  1445. Xarchives that do not contain themselves.
  1446. X.SH DIAGNOSTICS
  1447. XError messages are intended to be self-explanatory and are divided into
  1448. Xthree categories.  WARNINGS are intended to inform the user of an
  1449. Xunusual situation, such as a CRC error during extraction, or
  1450. X.BR \-freshen ing
  1451. Xof an archive containing a file newer than one specified on
  1452. Xthe command line.  ERRORS are fatal to one file, but execution
  1453. Xcontinues with the next file if any.  FATAL errors cause execution to
  1454. Xbe aborted.  The occurrence of any of these causes an exit status of
  1455. X1.  Normal termination without any errors gives an exit status of 0.
  1456. X(Under VAX/VMS, however, to avoid an annoying message,
  1457. X.I zoo
  1458. Xalways exits with an error code of 1.)
  1459. X.SH COMPATIBILITY
  1460. XAll versions of
  1461. X.I zoo
  1462. Xon all systems are required to create archives that can
  1463. Xbe extracted and listed with all versions of 
  1464. X.I zoo
  1465. Xon all systems, regardless of filename and
  1466. Xdirectory syntax or archive structure;  furthermore,
  1467. Xany version of 
  1468. X.I zoo
  1469. Xmust be able to fully manipulate all archives
  1470. Xcreated by all lower-numbered versions of
  1471. X.I zoo
  1472. Xon all systems.  So far as I can tell, this
  1473. Xupward compatiblity (all manipulations) and downward
  1474. Xcompatiblity (ability to extract and list)
  1475. Xis maintained by
  1476. X.I zoo
  1477. Xversion 2.0.
  1478. XYou are forbidden, with the force of
  1479. Xcopyright law, to create from the
  1480. X.I zoo
  1481. Xsource code any derivative work
  1482. Xthat violates this compatibility goal,
  1483. Xwhether knowingly or through negligence.
  1484. XIf any violation of this
  1485. Xcompatibility goal is observed\(emi.e.,
  1486. Xif you are able to use an implementation of
  1487. X.I zoo
  1488. Xto create an archive
  1489. Xthat some implementation of
  1490. X.I zoo
  1491. Xon any system cannot extract\(emthis should be
  1492. Xconsidered a serious problem and reported to me.
  1493. X.SH CHANGES
  1494. XHere is a list of changes occurring from version 1.50 to
  1495. Xversion 2.01.  In parentheses is given the version in which each
  1496. Xchange occurred.
  1497. X.TP
  1498. X\-
  1499. X(1.71) New modifiers to the list commands permit
  1500. Xoptional suppression of header and trailer information, 
  1501. Xinclusion of directory names in columnized listings, and 
  1502. Xfast one-column listings.
  1503. X.TP
  1504. X\-
  1505. X(1.71) Timezones are handled.
  1506. X.TP
  1507. X\-
  1508. X(1.71) A bug was fixed that had made it impossible to
  1509. Xindividually update comments for a file whose name did
  1510. Xnot correspond to MS-DOS format.
  1511. X.TP
  1512. X\-
  1513. X(1.71) A change was made that now permits use of the
  1514. Xshared library on the **IX PC.
  1515. X.TP
  1516. X\-
  1517. X(1.71) VAX/VMS is now supported reasonably well.
  1518. X.TP
  1519. X\-
  1520. X(2.00) A comment may now be attached to the archive itself.
  1521. X.TP
  1522. X\-
  1523. X(2.00) The \fBOO\fR option allows
  1524. Xforced overwriting of read-only files.
  1525. X.TP
  1526. X\-
  1527. X(2.00) \fIZoo\fR will no longer extract a file if a 
  1528. Xnewer copy already exists on disk;  the
  1529. X.B S
  1530. Xoption will override this.
  1531. X.TP
  1532. X\-
  1533. X(2.00) File attributes are preserved for **IX systems.
  1534. X.TP
  1535. X\-
  1536. X(2.00) Multiple generations of the same file are supported.
  1537. X.TP
  1538. X\-
  1539. X(2.00) \fIZoo\fR will now act as a compression or
  1540. Xdecompression filter on a stream of data and will
  1541. Xuse a CRC value to check the integrity of a
  1542. Xdata stream that is uncompressed.
  1543. X.TP
  1544. X\-
  1545. X(2.00) A bug was fixed that caused removal of a directory link
  1546. Xif files were moved to an archive by the superuser
  1547. Xon a **IX system.
  1548. X.TP
  1549. X\-
  1550. X(2.00) The data recovery modifier
  1551. X.B @
  1552. Xwas greatly enhanced.  Self-extracting archives created for MS-DOS
  1553. Xsystems can now be extracted by 
  1554. X.I zoo
  1555. Xon any system with help from 
  1556. X.I fiz(1).
  1557. X.TP
  1558. X\-
  1559. X(2.01)
  1560. XA bug was fixed that had caused the first generation of a file
  1561. Xto sometimes unexpectedly show up in archive listings.
  1562. X.TP
  1563. X\-
  1564. X(2.01) A bug was fixed that had caused the MS-DOS version
  1565. Xto silently skip files that could not be extracted because
  1566. Xof insufficient disk space.
  1567. X.TP
  1568. X\-
  1569. X(2.01) A bug was fixed that had sometimes made it impossible to
  1570. Xselectively extract a file by specifying its name, even 
  1571. Xthough all files could be extracted from the archive
  1572. Xby not specifying any filenames.  This occurred when
  1573. Xa file had been archived on a longer-filename system
  1574. X(e.g. AmigaDOS) and extraction was attempted on a
  1575. Xshorter-filename system (e.g. MS-DOS).
  1576. X.TP
  1577. X\-
  1578. X(2.01) A change was made that will make zoo preserve the mode
  1579. X(file protection) of a zoo archive when it is packed.
  1580. XThis is effective only if zoo is compiled to preserve
  1581. Xand restore file attributes.  Currently this is so
  1582. Xonly for **IX systems.
  1583. X.TP
  1584. X\-
  1585. X(2.01) 
  1586. XA bug was fixed that had caused an update of an archive to
  1587. Xnot always add all newer files.
  1588. X.TP
  1589. X\-
  1590. X(2.01) Blanks around equal signs in commands given to "make"
  1591. Xwere removed from the mk* scripts for better compatiblity
  1592. Xwith more **IX implementations including Sun's.
  1593. X.SH "FUTURE DIRECTIONS"
  1594. XA revised version of 
  1595. X.I zoo
  1596. Xis in the works that will be able to write newly-created archives
  1597. Xto standard output, and will also automatically perform end-of-line 
  1598. Xconversion for text files moved between dissimilar systems.
  1599. XIt will be upward and downward compatible with existing versions of 
  1600. X.I zoo.
  1601. X.SH ACKNOWLEDGEMENTS
  1602. XThe 
  1603. X.I zoo
  1604. Xarchiver was initially developed using Microsoft C 3.0
  1605. Xon a PC clone manufactured
  1606. Xby Toshiba of Japan and almost sold by Xerox.  Availability
  1607. Xof the following systems was helpful in achieving portability:
  1608. XPaul Homchick's Compaq running Microport System V/AT;  The 
  1609. XEskimo BBS somewhere in Oregon running Xenix/68000; Greg Laskin's
  1610. Xsystem 'gryphon' which is an Intel 310 running Xenix/286;  Ball 
  1611. XState University's AT&T 3B2/300, UNIX PC, and VAX-11/785 (4.3BSD)
  1612. Xsystems.  In addition J. Brian Waters provided feedback to
  1613. Xhelp me make the code compilable on his Amiga using
  1614. XManx/Aztec C.  More recently, actual development, as
  1615. Xopposed to portability testing, has been done exclusively
  1616. Xon my own AT from PC's Limited running Microport System V/AT.
  1617. XThe executable version 2.0 for MS-DOS is currently
  1618. Xcompiled with Borland's Turbo C 1.0.
  1619. X.PP
  1620. XSpecial thanks are due to:
  1621. X.PP
  1622. XJ. Brian Waters <uunet!bsu-cs!jbwaters>, who has worked
  1623. Xdiligently to port
  1624. X.I zoo
  1625. Xto AmigaDOS, created Amiga-specific code,
  1626. Xand continues keeping it updated.
  1627. X.PP
  1628. XPaul Homchick <rutgers!cgh!paul>, who provided numerous detailed
  1629. Xreports about some nasty bugs.
  1630. X.PP
  1631. XBill Davidsen <steinmetz!crdos1!davidsen>, who fixed
  1632. X.I "zoo's"
  1633. Xhandling of daylight savings time, provided changes to make this
  1634. Xmanual format correctly with
  1635. X.I troff,
  1636. Xand provided many useful bug reports and suggestions.
  1637. X.PP
  1638. XMark Alexander <amdahl!drivax!alexande>, who provided me with some bug
  1639. Xfixes, and also some portability modifications and
  1640. Xspeed optimizations
  1641. Xthat are due to be incorporated into the next release.
  1642. X.SH AUTHOR
  1643. XRahul Dhesi
  1644. END_OF_FILE
  1645. if test 45120 -ne `wc -c <'zoo.1'`; then
  1646.     echo shar: \"'zoo.1'\" unpacked with wrong size!
  1647. fi
  1648. # end of 'zoo.1'
  1649. fi
  1650. echo shar: End of archive 10 \(of 10\).
  1651. cp /dev/null ark10isdone
  1652. MISSING=""
  1653. for I in 1 2 3 4 5 6 7 8 9 10 ; do
  1654.     if test ! -f ark${I}isdone ; then
  1655.     MISSING="${MISSING} ${I}"
  1656.     fi
  1657. done
  1658. if test "${MISSING}" = "" ; then
  1659.     echo You have unpacked all 10 archives.
  1660.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1661. else
  1662.     echo You still need to unpack the following archives:
  1663.     echo "        " ${MISSING}
  1664. fi
  1665. ##  End of shell archive.
  1666. exit 0
  1667.